package com.wc.alorithm_blue_bridge._思维.Q3898;

import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;
import java.io.StreamTokenizer;

/**
 * @Author congge
 * @Date 2023/11/8 15:21
 * @description 泡澡
 * https://www.lanqiao.cn/problems/3898/learning/?page=1&first_category_id=1&sort=students_count&tags=%E5%B7%AE%E5%88%86
 */
public class Main {
    public static void main(String[] args) {
        Input sc = new Input();
        long n = sc.nextInt();
        long w = sc.nextInt();
        int maxN = 200000;
        long[] a = new long[maxN + 2];
        long[] b = new long[maxN + 2];
        int maxR = 0;
        int minL = maxN;
        while (n-- > 0) {
            int l = sc.nextInt();
            int r = sc.nextInt();
            int p = sc.nextInt();
            minL = Math.min(minL, l);
            maxR = Math.max(maxR, r);
            b[l] += p;
            b[r] -= p;
        }
        a[minL] = b[minL];
        long maxP = a[minL];
        for (int i = minL + 1; i <= maxR; i++) {
            a[i] = a[i - 1] + b[i];
            maxP = Math.max(maxP, a[i]);
        }
        if (maxP > w) {
            System.out.println("No");
        } else {
            System.out.println("Yes");
        }
    }

    static class Input {
        StreamTokenizer in = new StreamTokenizer(new BufferedReader(new InputStreamReader(System.in)));

        public int nextInt() {
            try {
                in.nextToken();
            } catch (IOException e) {
                e.printStackTrace();
            }
            return (int) in.nval;
        }
    }
}
